The present invention relates to storage technology, and more specifically, to a method and an apparatus for thin provisioning.
Thin provisioning is a provisioning manner capable of saving storage resources. According to principles of thin provisioning, physical storage resources initially allocated to application programs are less than virtual storage resources declared by the application programs; when the physical storage resources allocated to the application programs cannot meet needs of application programs, physical storage resources are gradually added until the physical storage resources reach the virtual storage resources. For example, one application program can declare 100 G virtual storage resources. Those skilled in the art may appreciate that the application program does not produce 100 G data within a period of time right after the beginning of the run; during the run, the application program might possibly release some physical storage resources that had been previously occupied, and the released physical storage resources may be used to store newly-produced data. Correspondingly, only 10 G physical storage resources may be initially allocated for use of the application program; if the 10 G physical storage resources are filled with data produced by the application program and the application program needs more physical storage resources, another 10 G physical storage resources may be added to the application program.
As far as the application program is concerned, the thin provisioning is completely transparent. In other words, it is unnecessary for the application program to concern how many physical storage resources has been allocated, instead, the application program only needs to manage the declared virtual storage resources. Regarding a storage system, a smaller physical storage resource may be used to support a larger virtual storage resource, thereby improving use efficiency of the physical storage resources.
A large-sized storage system is usually comprised of different types of storage devices which are substantially distinct in terms of price and performance. For example, it takes an average response time of 10 milliseconds to read a piece of data from a hard disk drive HDD of 15,000 revolutions per minute, whereas it takes an average response time of less than 1 millisecond to read the piece of data directly from a solid state disk SSD. Since a manufacturing cost of a high-speed storage is higher than a low-speed storage, a data capacity of the high-speed storage in the system is smaller than a data capacity of the low-speed storage. In other words, only portions of the data can be stored in the high-speed storage.
Therefore, a solution is needed to determine the type of a storage device upon which the physical storage resources allocated to the application program are located under thin provisioning.